package com.jianhua.appmarket.module.service.impl;

import com.jianhua.appmarket.module.dao.AppDao;
import com.jianhua.appmarket.module.dao.AppVersionDao;
import com.jianhua.appmarket.module.entity.AppInfo;
import com.jianhua.appmarket.module.entity.AppVersion;
import com.jianhua.appmarket.module.service.IAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppService implements IAppService {

    @Autowired
    private AppDao appDao;

    @Autowired
    private AppVersionDao appVersionDao;

    @Override
    public List<AppInfo> listAllApp() {
        return appDao.listAll();
    }

    @Override
    public List<AppVersion> listAppVersions(Long appId) {
        return appVersionDao.listAllByAppId(appId);
    }
}
